#!/bin/bash -e
demo_pw=$(openssl rand -base64 20 | tr -dc '[:alpha:]')

echo -n $demo_pw > /tmp/ppw

demo_playload=$(
                aliyun kms Encrypt \
                --KeyId 8d33bcae-5ae0-4bd2-ba2c-182de21ce564 \
                --Plaintext $demo_pw \
                --EncryptionContext |jq  ".CiphertextBlob"
                )
rm /tmp/ppw

echo "demo_pw : $demo_pw"
echo "demo_playload : $demo_playload"
